﻿CREATE PROCEDURE [dbo].[s_ZipToShip]
AS

EXEC [reports].[s_Prep_Deferments_Vantage]
EXEC Target.[dbo].[s_Export] 1

BACKUP DATABASE [Target] TO  DISK = N'B:\Weekly\Vantage\Target.bak' WITH NOFORMAT, INIT,  NAME = N'Target-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10

EXEC master..xp_cmdshell
'"C:\Program Files\WinRAR\WinRAR.exe" a -afzip B:\Weekly\Vantage\Target.zip B:\Weekly\Vantage\Target.bak'

EXEC master..xp_cmdshell '"copy B:\Weekly\Vantage\Target.zip \\goofy\vantage'
EXEC master..xp_cmdshell '"copy B:\Weekly\Vantage\Target.zip \\goofy\vantage1'


